﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Universe.WCF.Behaviors;

namespace Universe.TrafficProfiler
{
    enum ListenerState
    {
        Zero,
        Running,
        Paused,
        Stopped
    }

    class TrafficPair
    {
        public TrafficStatistic OnServer;
        public TrafficStatistic OnClient;

        public TrafficPair(TrafficStatistic onServer, TrafficStatistic onClient)
        {
            OnServer = onServer;
            OnClient = onClient;
        }

        public static TrafficPair Substract(TrafficPair big, TrafficPair small)
        {
            return
                new TrafficPair(
                    TrafficStatistic.Substract(big.OnServer, small.OnServer),
                    TrafficStatistic.Substract(big.OnClient, small.OnClient));
        }

        public static TrafficPair Union(TrafficPair one, TrafficPair two)
        {
            return
                new TrafficPair(
                    TrafficStatistic.Union(one.OnServer, two.OnServer),
                    TrafficStatistic.Union(one.OnClient, two.OnClient));
        }
    }
}
